package com.haipumi.servlets.backadmin;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.haipumi.beans.DataGrid;
import com.haipumi.beans.haipumi_helpInfo;
import com.haipumi.biz.IBackHelpInfoBiz;
import com.haipumi.biz.impl.BackHelpInfoBizImpl;
import com.haipumi.servlets.CommonServlet;

public class BackHelpInfoServlet extends CommonServlet {

	IBackHelpInfoBiz ibhib=new BackHelpInfoBizImpl();
	/**
	 * 
	 */
	private static final long serialVersionUID = 8987747669981698451L;

	
	
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String op=null;
		op=request.getParameter("op");
		if("findallhelpinfo".equals(op)){
			findallhelpinfo(request,response);
		}
	}



	private void findallhelpinfo(HttpServletRequest request,
			HttpServletResponse response) {
		List<haipumi_helpInfo>helpinfolist=null;
		helpinfolist=ibhib.findAllHelpInfo();
		int r=0;
		r=ibhib.countAllHelpeInfo();
		DataGrid dg=new DataGrid();
		dg.setRows(helpinfolist);
		dg.setTotal(r);
		super.outData(response, dg);
	}

}
